package oj;

/**
 public class TreeNode {
 int val = 0;
 TreeNode left = null;
 TreeNode right = null;

 public TreeNode(int val) {
 this.val = val;

 }

 }
 */

public class Day17S {
    public void Mirror(TreeNode root) {
        if(root==null || root.left==null&&root.right==null){
            return;
        }
        TreeNode rootLeft=root.left;
        TreeNode rootRight=root.right;
        Mirror(rootLeft);
        Mirror(rootRight);

        root.left=rootRight;
        root.right=rootLeft;

    }
}
